x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC.
authorKeir Fraser <keir@xen.org>
Wed, 20 Oct 2010 08:56:36 +0000 (09:56 +0100)
committerKeir Fraser <keir@xen.org>
Wed, 20 Oct 2010 08:56:36 +0000 (09:56 +0100)
commit5e7e62992dc51712679372354dbfcb95715eb346
treed1720feac331e3216f50f7125bbad6bf5e8d46f2
parentda6eab421072e0cec2afb49a02009b408a8938d4
x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC.

This fixes a livelock in hvmloader with credit2 scheduler, whereby an
AP can be brought online, do its work, and shut itself down, before
the BSP re-emulates the VLAPIC write that sent the SIPI. BSP then ends
up in an endless re-emulation work where it sees the target vcpu is
down, therefore schedules a tasklet, which does no work because the
vcpu is already initialised. The fix is to check v->is_initialised
rather than VPF_down, before scheduling the tasklet.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vlapic.c